import React from 'react'
import {Button} from 'antd'


class MyButton extends React.Component {
    state = {
        hidden:false
    }
    componentDidMount(){
    
        console.log(this.props,allAction,'mybutton1')
    }
    hasAction = (action)=>{
        const all = new Set(allAction)
        return all.has(parseInt(action));
    }
    render(){
        const props = this.props;
        return (
            // <Button {...props} hidden={this.state.hidden} >{props.name}</Button>
            <span>
                {
                    this.hasAction(props.actionCode)?<Button {...props} >{props.name}</Button>:''
                }
            </span>
        )
    }
}

export default MyButton 